using SX.BaseService.Service.SysDictionary.ViewModel;
using SX.BaseService.Service.ViewModel;
using SX.Core;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace SX.BaseService.Service
{
    /// <summary>
	///字典服务接口
	/// </summary>
    public interface ISysDictionaryService
    {
        /// <summary>
        /// 查询
        /// </summary>
        /// <returns></returns>
        Task<IApiResult> Query(string name);
       
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<IApiResult> Add(DictionaryAddModel model);
        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task<IApiResult> Delete( List< string> ids);

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<IApiResult> Update(DictionaryUpdateModel model);

        /// <summary>
        /// 查询parentid=0 的数据
        /// </summary>
        /// <returns></returns>
        Task<IApiResult> QueryParents();

        /// <summary>
        /// 查询单个
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<IApiResult> GetById(string id);
    }
}